Repository navigation
feat: SBS - #275
Merged
Merged
feat: SBS#275
Conversation
arifBurakDemiray
marked this pull request as draft
July 14, 2026 12:26
Dependency security scanScanned 24 resolved dependencies, failing on HIGH and above. Result: passed |
Code coverage
Files changed by this pull request
Least covered classes (10 shown)
|
The store file was truncated and then written in place on every save, and the SDK saves it at every init and every settings response. A process stopped mid-write left a file that made every later Countly.init throw a JSONException into the application. Saves now write a temporary file next to the store and move it over the store, atomically where the file system allows. A store that is not valid JSON is logged and replaced by empty storage on the next save instead of failing init, and a temporary file left by an interrupted save is deleted when the storage opens, so it is not taken for other stored SDK data.
Each response was merged into the stored settings, so a setting removed in SDK Manager kept its last server value for good, across restarts too: a removed kill switch, filter, journey trigger, limit or rqs stayed in force. Each valid response now replaces the stored settings, and a setting it leaves out goes back to the developer configuration or the SDK default, as the reference implementation does since its settings merge fix. Values the validation drops resolve the same way. A cr false from the server, from storage or from the provided settings no longer lifts the consent requirement the developer set: the resolved requirement is the developer's value or a cr true, so the settings can add the requirement but never remove it. While a device ID change without merge ends the previous device ID's timed events and view, a journey trigger or a full event queue reached on that thread no longer sends the queue under the new device ID; those events go out together under the previous one, and refresh no content zone. Tests whose later responses relied on the merge now carry the settings they need in each response.
SBS review fixes: replace stored settings, keep the consent requirement, device ID trigger, store file
# Conflicts: # sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java
arifBurakDemiray
marked this pull request as ready for review
October 22, 2026 06:35
… time - A gathered line needs the consent of the feature its bracket names. A line of no feature needs the events and user profiles consents the app enabled, and removing a consent drops the held lines of that feature. - One sdk_logs request waits in the queue at a time, checked against the stored request, and a sent batch resumes only a delivery it held back. - A device ID change without merge queues the held lines and the tail of a stopped gather under the old ID and stops the gather. An answer requested before that change no longer arms it, while a change with merge keeps it. - A gather the server stops uploads its last lines once, under its ID. - The networking decides between a drain and a recheck under one lock, and a failing drain still rechecks. - SessionImpl logs event, location and view data after the feature check. - The test RSA key is 2048 bits (CodeQL).
…d features - Every feature getter returns an interface whose calls go to the running module and are ignored, with an error to callbacks, until it runs. One kept from before init or before a consent change reaches the module later. - onConsentRemoval stops only the modules of the removed features, and removing the location consent erases the location on the server. - A module built for a consent given after init is active, so unhandled crashes are recorded. - Only the SDK's own [CLY]_ keys are internal events. - A failing timer run no longer ends its timer, and a failing module no longer holds back the others on the same tick. - Events read the view IDs of the views module that runs now. - Remote config download callbacks and a content display registered before the consent are kept for the module that runs later. - The deprecated Countly calls and the user editor log no user data before the consent check of their feature.
…missing files - The breadcrumb list is guarded, so one added while a crash is recorded on another thread is not lost. - A refused second init no longer replaces the running SDK's logger. - A missing storage file is logged at debug level, one that cannot be opened as an error.
SBS log gathering: per feature consent, one queued batch, device ID change and stopped gather tail
Never null feature interfaces, consent removal of only its features, SDK owned [CLY]_ keys
Breadcrumbs during a crash, the logger on a refused init, missing storage file errors
…them Two tests waited until a request file was gone, then checked a line that the SDK logs only after it removes the file: the request drop age test the line of the request's owner, the backoff test the "not backing off" line of the last request. On a busy runner the check could run in between and fail, as the drop age test did on CI with "expected:<1> but was:<0>". Both now wait for their line with awaitLogs.
Wait for the lines logged after a request's removal before asserting them
- String literals come first in comparisons, the probe rows keep a copy of their paths, and the connection test module declares its fields before its nested classes. - The names of a FilterList sit in a field that no longer repeats the class name. - The connection test listener is package-private, so its test reads it without reflection. - Tests group the digits of long numeric literals, drop an unused import and an empty constructor, and name an ignored exception as such. - The changelog entry about the feature interfaces wraps onto continuation lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.